package com.example.demo.shengcheng;

import java.util.Random;

public class Deltype {
    static Random random = new Random();
    static  String[] deathCauses = {
             "车祸", "猝死", "溺水", "火灾", "食物中毒",
            "枪击", "刀伤", "跳楼", "爆炸", "电击", "窒息", "自杀",
            "药物中毒", "突发疾病", "坠落", "淹死", "气体中毒", "冰冻","中风","糖尿病","艾滋病","癌症"};

    public static String siwang(int i){
        if (i!=0){
            return deathCauses[random.nextInt(deathCauses.length)];
        }else return "老死";
    }

    public static void main(String[] args) {
        System.out.println(siwang(1));
    }
}
